package com.hanggold.springboot.lesson4.select;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

public class MyTySelector implements ImportSelector {


    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {

        System.out.println("执行selector......");


        importingClassMetadata.getMetaAnnotationTypes(SpringBootApplication.class.getName()).forEach(e->{

            System.out.println("SpringBootApplication: "+ e);
        });
        importingClassMetadata.getAnnotationTypes().forEach(e->{
            System.out.println("直接名称: "+ e);
        });

        return new String[0];
    }
}
